package com.sie.project.utils;

/**
 * @author linjinde
 */

public enum ProjectClassName {
    /*
    * 返回ProjectClassName
    * */
    ALL(0, "全部"),
    NEW_DEVELOPMENT(1, "全新开发"),
    DERIVED_DEVELOPMENT(2, "衍生开发"),
    SOFT_MODEL_SAMPLE(3, "软模试样"),
    BACKUP_MODEL_SAMPLE(4, "备模试样"),
    RESERVE_PROJECT(5, "储备项目");

    private int code;
    private String value;

    ProjectClassName(int code, String value) {
        this.code = code;
        this.value = value;
    }

    public int getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }

    public static ProjectClassName getByCode(int code) {
        for (ProjectClassName type : ProjectClassName.values()) {
            if (type.getCode() == code) {
                return type;
            }
        }
        return null;
    }
}
